import React from 'react'
import './index.css'

export default function Tab({ data, click }) {

  return (
    <div className='tab_container'>
      {
        data.map(
          item => <div key={item.id} className={`tab_container_item_container ${item.isSelected ? 'tab_container_item_container_active' : ''}`} onClick={() => click(item.id)}>
            {item.value}
          </div>
        )
      }
    </div>
  )
}
